package com.power.sifa.std.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;
import com.power.sifa.std.model.Std_mgrcate;

import javax.transaction.Transactional;
import java.io.Serializable;
import java.util.List;

/**
 * 行政管理类别 持久层(hibernate)
 */

public interface Std_mgrcateDao extends JpaRepository<Std_mgrcate, Serializable>, JpaSpecificationExecutor<Std_mgrcate>, Repository<Std_mgrcate, Serializable>, Std_mgrcateDaoCustom<Std_mgrcate, Serializable> {

   @Modifying
   @Transactional
   @Query("delete  from Std_mgrcate s where  s.id in (:ids) ")
   void removeByIds(@Param("ids") List<Integer> ids);

   @Query(" from Std_mgrcate s")
   List<Std_mgrcate> list();
}
